package com.tangyuan.common.enums;

import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum ConcernTypeEnum {

    VIDEO(1,"小视频"),
    HEADLINES(2,"百家"),
    LIVE(3,"直播"),
    SEARCH(4,"搜索关注")
    ;

    public final Integer type;
    public final String typeStr;

    public static ConcernTypeEnum getEnum(Integer type){
        for (ConcernTypeEnum value : ConcernTypeEnum.values()) {
            if(value.type.equals(type)){
                return value;
            }
        }
        return VIDEO;
    }
}
